package main;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.swf.common.httpClient.HttpClientUtil;
import com.swf.common.utils.FwsFileUtils;

public class SendCiticFormat extends Thread{
	private String filename;
	
	
	public void setFilename(String filename) {
		this.filename = filename;
	}
	private static final Logger logger = LoggerFactory.getLogger(SendCiticFormat.class);
	public static void main(String[] args) {
		SendCiticFormat s1 = new SendCiticFormat();
		SendCiticFormat s2 = new SendCiticFormat();
		s1.setFilename("2.xml");
		s2.setFilename("3.xml");
		s1.start();
		s2.start();
	}
	
	public void run(){
		String url = "http://192.168.52.139:7001/ecs/citic/citicfund/comm";
		logger.info("1");
		String content = FwsFileUtils.loadFile("D:/d/"+filename, "GBK");
		byte[] byte_msg = content.getBytes();
		String send = HttpClientUtil.send(url, byte_msg);
		System.out.println(send);
	}
}
